

package com.hazelcast.query.impl.predicates;

import com.hazelcast.query.Predicate;
import com.hazelcast.query.impl.IndexRegistry;

/**
 * Visitor can inspect internal state of a node,
 * but it's not allowed to mutate its internal state.
 * <p>
 * Visitor can return a new instance of predicate
 * if modification is needed
 */
public interface Visitor {

    Predicate visit(EqualPredicate predicate, IndexRegistry indexes);

    Predicate visit(NotEqualPredicate predicate, IndexRegistry indexes);

    Predicate visit(AndPredicate predicate, IndexRegistry indexes);

    Predicate visit(OrPredicate predicate, IndexRegistry indexes);

    Predicate visit(NotPredicate predicate, IndexRegistry indexes);

    Predicate visit(InPredicate predicate, IndexRegistry indexes);

    Predicate visit(BetweenPredicate predicate, IndexRegistry indexes);

}
